<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>货品批量售出</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
			
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/ka/productManage/">货品批量售出</a></li>
	</ul>
	<form:form id="inputForm" modelAttribute="productManage" action="${ctx}/ka/productManage/batchSoldOut" method="post" class="breadcrumb form-search">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
		<div class="control-group">
			<table id="contentTable" class="table table-striped table-bordered table-condensed">
				<thead>
					<tr>
						<th>品类</th>
						<th>货号</th>
						<th>供应商</th>
						<th>尺码</th>
						<th>颜色</th>
						<th>库存件数</th>
						<th>售出件数</th>
						<th>价格</th>
						<th>货架</th>
					</tr>
				</thead>
				<tbody>
				<c:forEach items="${productManage.columnList}" var="productManage" varStatus="vs">
					<tr>
						<td>
							<input type="hidden" name="columnList[${vs.index}].id" value="${productManage.id}"/>
							<input type="text" name="columnList[${vs.index}].category" value="${productManage.category}" maxlength="64" class="required" style="width:100px;" readonly="true"/>
						</td>
						<td>
							<input type="text" name="columnList[${vs.index}].productCode" value="${productManage.productCode}" maxlength="64" class="required" style="width:100px;" readonly="true"/>
						</td>
						<td>
							<input type="text" name="columnList[${vs.index}].supplier" value="${productManage.supplier}" maxlength="64" class="required" style="width:100px;" readonly="true"/>
						</td>
						<td>
							<input type="text" name="columnList[${vs.index}].size" value="${productManage.size}" maxlength="64" class="required" style="width:100px;" readonly="true"/>
						</td>
						<td>
							<input type="text" name="columnList[${vs.index}].color" value="${productManage.color}" maxlength="32" class="required" style="width:100px;" readonly="true"/>
						</td>
						<td>
							<input type="text" name="columnList[${vs.index}].num" value="${productManage.num}" maxlength="5" class="required input-min digits" style="width:100px;" readonly="true"/>
						</td>
						<td>
							<input type="text" name="columnList[${vs.index}].num" value="${productManage.num}" maxlength="5" class="required input-min digits" style="width:100px;"/>
						</td>
						<td>
							<input type="text" name="columnList[${vs.index}].price" value="${productManage.price}" class="required" style="width:100px;" readonly="true"/>
						</td>
						<td>
							<input type="text" name="columnList[${vs.index}].gridNo" value="${productManage.gridNo}" maxlength="32" style="width:100px;" readonly="true"/>
						</td>
						<td>
							<input type="hidden" name="columnList[${vs.index}].stockDate" value="<fmt:formatDate value="${productManage.stockDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" style="width:100px;" readonly="true"/>
						</td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="ka:productManage:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
		</div>
	</form:form>
</body>
</html>